#!/usr/bin/env perl
# $Id: test4.pl acabbce13f25 2012/11/11 02:33:52 pgurumur $
# Copyright (c) 2012 Prabhu Gurumurthy <pgurumur@gmail.com>
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
# File test4.pl generated on Friday October 26, 2012 @ 12:50:26 PDT
#

# __version__  = "$Revision: acabbce13f25 $"
# __author__   = "$Author: pgurumur $"
# __modified__ = "$Date: 2012-11-11 02:33:52Z $"

use strict;
use warnings;
use Getopt::Long;

Getopt::Long::Configure("default", "bundling");
push my @prog, split(/\//, $0);
my $program = $prog[$#prog];
my $arg = int(scalar(@ARGV));
my %opt = ();
my $session = undef;
my $error = undef;

sub usage {
   printf("%s options\n", $program);
   exit 1;
}

sub main {
   GetOptions(\%opt, "help|?", "test|t=s", "option|o") or usage();
   usage() if $opt{help};

   while (my($key, $value) = each %opt) {
      print "key: $key, value: $opt{$key}\n";
   }
}

if ($arg le 1) {
   usage();
}
else {
   main();
}

